From: Ross Lagerwall Date: Fri, 12 Jun 2015 10:07:05 +0000 (+0200) Subject: x86: avoid tripping watchdog when constructing dom0 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3099 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=c5089fae0f6f71443356530ecec4781788c7377a;p=xen.git x86: avoid tripping watchdog when constructing dom0 Constructing dom0 may take a few seconds, particularly if the slow VESA graphics terminal is used. Process pending softirqs a few times to avoid tripping a watchdog with a short timeout. Signed-off-by: Ross Lagerwall Move inclusion of xen/softirq.h (and at once clean up other includes). Signed-off-by: Jan Beulich --- diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index 03e4bfeb84..d76707fc53 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -930,6 +930,8 @@ int __init construct_dom0( BUG_ON(d->vcpu[0] == NULL); BUG_ON(v->is_initialised); + process_pending_softirqs(); + printk("*** LOADING DOMAIN 0 ***\n"); d->max_pages = ~0U; @@ -1167,6 +1169,8 @@ int __init construct_dom0( _p(v_start), _p(v_end)); printk(" ENTRY ADDRESS: %p\n", _p(parms.virt_entry)); + process_pending_softirqs(); + mpt_alloc = (vpt_start - v_start) + pfn_to_paddr(alloc_spfn); if ( vinitrd_start ) mpt_alloc -= PAGE_ALIGN(initrd_len); diff --git a/xen/common/libelf/libelf-dominfo.c b/xen/common/libelf/libelf-dominfo.c index 86403b9f8a..0771323750 100644 --- a/xen/common/libelf/libelf-dominfo.c +++ b/xen/common/libelf/libelf-dominfo.c @@ -235,6 +235,10 @@ static unsigned elf_xen_parse_notes(struct elf_binary *elf, ELF_HANDLE_PTRVAL(note) < parms->elf_note_end; note = elf_note_next(elf, note) ) { +#ifdef __XEN__ + process_pending_softirqs(); +#endif + if ( *total_note_count >= ELF_MAX_TOTAL_NOTE_COUNT ) { elf_mark_broken(elf, "too many ELF notes"); diff --git a/xen/common/libelf/libelf-private.h b/xen/common/libelf/libelf-private.h index 854a0d7319..dd4675a460 100644 --- a/xen/common/libelf/libelf-private.h +++ b/xen/common/libelf/libelf-private.h @@ -18,11 +18,9 @@ #ifdef __XEN__ -#include -#include -#include #include #include +#include #include #include